package com.by.ui;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ScrollView;

import com.by.and_widget.dragtoplayout.DragTopLayout;
import com.by.and_widget.dragtoplayout.ScrollableHelper;

/**
 * Created by admin on 2016/5/11.
 */
public class DragTopActivity extends AppCompatActivity implements ScrollableHelper.ScrollableContainer {
    private DragTopLayout mDragTopLayout;
    private ScrollView mScrollView;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_drag_top);
        mDragTopLayout = (DragTopLayout) findViewById(R.id.drag_top_layout);
        mScrollView = (ScrollView) findViewById(R.id.scroller);
        mDragTopLayout.getHelper().setCurrentScrollableContainer(this);
    }


    /**
     * @return ScrollView/ListView/RecycelerView..'s instance
     */
    @Override
    public View getScrollableView() {
        return mScrollView;
    }
}
